package org.swingplus.core.bean;

import com.google.common.collect.BiMap;
import com.google.common.collect.HashBiMap;

import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.Map;

public class DefinitionMetadata {

    private Object instance;

//    private String

    private Class beanClass;
    private String dependentOn;
    
    private String name;
    private String simpleName;

    private Field[] fields;
    private Field[] declaredFields;


    private Map<String,Field> fieldsNameMap;

    private BiMap<String,Field> fieldNameMap = HashBiMap.create();

    private int fieldSize;


    private boolean existsAutowired;
    private Field[] autowiredField;
    private int autowiredFieldSize;

    private Annotation[] annotationType;

    private Method[] methods;
    private int methodSize;

    public Object getInstance() {
        return instance;
    }

    public void setInstance(Object instance) {
        this.instance = instance;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSimpleName() {
        return simpleName;
    }

    public void setSimpleName(String simpleName) {
        this.simpleName = simpleName;
    }

    public Field[] getFields() {
        return fields;
    }

    public void setFields(Field[] fields) {
        this.fields = fields;
    }

    public Map<String, Field> getFieldsNameMap() {
        return fieldsNameMap;
    }

    public void setFieldsNameMap(Map<String, Field> fieldsNameMap) {
        this.fieldsNameMap = fieldsNameMap;
    }

    public BiMap<String, Field> getFieldNameMap() {
        return fieldNameMap;
    }

    public void setFieldNameMap(BiMap<String, Field> fieldNameMap) {
        this.fieldNameMap = fieldNameMap;
    }

    public int getFieldSize() {
        return fieldSize;
    }

    public void setFieldSize(int fieldSize) {
        this.fieldSize = fieldSize;
    }

    public boolean isExistsAutowired() {
        return existsAutowired;
    }

    public void setExistsAutowired(boolean existsAutowired) {
        this.existsAutowired = existsAutowired;
    }

    public Field[] getAutowiredField() {
        return autowiredField;
    }

    public void setAutowiredField(Field[] autowiredField) {
        this.autowiredField = autowiredField;
    }

    public int getAutowiredFieldSize() {
        return autowiredFieldSize;
    }

    public void setAutowiredFieldSize(int autowiredFieldSize) {
        this.autowiredFieldSize = autowiredFieldSize;
    }

    public Annotation[] getAnnotationType() {
        return annotationType;
    }

    public void setAnnotationType(Annotation[] annotationType) {
        this.annotationType = annotationType;
    }

    public Method[] getMethods() {
        return methods;
    }

    public void setMethods(Method[] methods) {
        this.methods = methods;
    }

    public int getMethodSize() {
        return methodSize;
    }

    public void setMethodSize(int methodSize) {
        this.methodSize = methodSize;
    }

	public Class getBeanClass() {
		return beanClass;
	}

	public void setBeanClass(Class beanClass) {
		this.beanClass = beanClass;
	}

	public String getDependentOn() {
		return dependentOn;
	}

	public void setDependentOn(String dependentOn) {
		this.dependentOn = dependentOn;
	}

    public Field[] getDeclaredFields() {
        return declaredFields;
    }

    public void setDeclaredFields(Field[] declaredFields) {
        this.declaredFields = declaredFields;
    }
}
